﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Collections.Generic;

/// <summary>
/// Summary description for clsEmploymentTypeDAL
/// </summary>
public class clsEmploymentTypeDAL
{
    InstantNaukriDataContextDataContext objInstantNaukriDataContextDataContext = new InstantNaukriDataContextDataContext();
    public clsEmploymentTypeDAL()
    {
        //
        // TODO: Add constructor logic here
        //
    }

    public List<IN_TB_EMPLOYMENT_TYPE> GetAllEmploymentTypes()
    {
        try
        {
            List<IN_TB_EMPLOYMENT_TYPE> objIN_TB_EMPLOYMENT_TYPE = new List<IN_TB_EMPLOYMENT_TYPE>();
            objIN_TB_EMPLOYMENT_TYPE = (from obj in objInstantNaukriDataContextDataContext.IN_TB_EMPLOYMENT_TYPEs
                                        select obj).ToList();
            return objIN_TB_EMPLOYMENT_TYPE;
        }
        catch (Exception)
        {

            throw;
        }
    }
    public IN_TB_EMPLOYMENT_TYPE GetEmploymentTypeById(int ID)
    {
        try
        {
            IN_TB_EMPLOYMENT_TYPE objIN_TB_EMPLOYMENT_TYPE = new IN_TB_EMPLOYMENT_TYPE();
            objIN_TB_EMPLOYMENT_TYPE = (from obj in objInstantNaukriDataContextDataContext.IN_TB_EMPLOYMENT_TYPEs
                                         where obj.ID == ID
                                         select obj).SingleOrDefault();
            return objIN_TB_EMPLOYMENT_TYPE;
        }
        catch (Exception)
        {

            throw;
        }
    }
}
